/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//
//		File Name		:		ObjectManager.h
//
//		Author			:		Kevin Jordan
//
//		Purpose			:		To encapsulate the functions and members of the ObjectManager
//
//		Dates			:		Written( Feb 15, 2011 ) by Kevin Jordan		LastUpdate( Feb 15, 2011  ) by Kevin Jordan 
//	
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
#ifndef OBJECT_MANAGER_H
#define OBJECT_MANAGER_H
#include <vector>
using std::vector;

#include "IBaseInterface.h"
#include "CPlayer.h"

class CBaseObject;


class VIN_ObjectManager
{

private:
	vector<IBaseInterface*>	m_vEnemies;
	vector<IBaseInterface*> m_vP_Objects;
	vector<IBaseInterface*> m_vObjects;

	CPlayer* pPlayer;
	
	VIN_ObjectManager();
	~VIN_ObjectManager();
	VIN_ObjectManager( const VIN_ObjectManager& copy );
	VIN_ObjectManager* operator=( const VIN_ObjectManager& assign );

	//Instance
	static VIN_ObjectManager*	m_pInstance;

public:

	bool CheckCollision();
	//Loop through every list and Update and Render
	void UpdateObjects(float fElapsedTime);

	bool InputObjects();
	void RenderObjects();

	//check the type then add it to appropriate vector
	//Int is which of the lists you wish to add the object to
	// 0 = for Anything Enemy Related, 1 = for Player Projectiles, 2 = for any other Object
	void AddObject(int ListToAdd, IBaseInterface* pObject);
	//check the type then remove it from appropriate vector
	void RemoveObject(int ListToRemove, IBaseInterface* pObject);


	unsigned int GetNumOfObjectsEnemies() {return m_vEnemies.size(); }
	unsigned int GetNumOfObjectsPlayerProjectiles() {return m_vP_Objects.size(); }
	unsigned int GetNumOfObjects_Object() {return m_vObjects.size(); }


	//Remove all Objects from everyList
	void RemoveAllObjects(void);

	static VIN_ObjectManager*	GetInstance();
	static void DeleteInstance();

	void SetPlayer(CPlayer* newPlayer)	{	pPlayer = newPlayer; }
	void ShutDown();
	void KillAll();
};

#endif